﻿ 
using System.ComponentModel;

namespace NTTDATA.BEENChina.ResultCertification.PropertyGridUtil.CustomObject
{
    [TypeConverter(typeof(CustomConverter))]
    public class DataExists : PropertyData
    {
        private int _row = -1;
        private int col = -1;
        private int group = 0;

        [Category("range")]
        public int Row { get { return _row; } set { _row = value; } }
        [Category("range")]
        public int Col { get { return col; } set { col = value; } }

        //一组的条件
        [Category("range")]
        public int Group { get { return group; } set { group = value; } }

        public string Description { get; set; }
        [Category("Exists")]
        public bool Exists { get; set; }
        
        #region PropertyData impl
        public string GetDisplayName()
        {
            return Row.ToString() + "," + Col.ToString() + ":" + (　Exists ? "有" : "無");
        }
        public string GetDescription()
        {
            return string.Empty;
        }

        public string GetValue()
        {
            return Row.ToString() + "," + Col.ToString() + ":" + (Exists ? "有" : "無");
        }
        #endregion
    }
}
